using System;
using System.Collections.Generic;

namespace CastleSample.UI.Core
{
    public class ContainerEventArgs : EventArgs
    {
        private Dictionary<string, object> args = new Dictionary<string, object>();

        public ContainerEventArgs() {}

        public ContainerEventArgs(string argName, object argValue)
        {
            args[argName] = argValue;
        }

        public ContainerEventArgs(string arg1Name, object arg1Value, string arg2Name, object arg2Value)
        {
            args[arg1Name] = arg1Value;
            args[arg2Name] = arg2Value;
        }

        public object this[string name]
        {
            get
            {
                if (args.ContainsKey(name))
                {
                    return args[name];
                }
                else
                {
                    return null;
                }
            }
        }
    }
}